package com.ithuang.quartz.task;

import org.springframework.stereotype.Component;

import java.util.Date;

@Component("task2")
public class Task2 {

    public void handle(){
        Date date = new Date();
        System.out.println("task2"+date+"开始");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("task2"+date+"结束");
    }

}
